package com.oleasy.platform.api.common.model;

import com.oleasy.platform.api.common.model.base.BaseCompanyIdEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;

import javax.persistence.Entity;
import javax.persistence.Table;


@ApiModel(value = "${t.entityName}Entity", description = "${t.name}表", parent = BaseCompanyIdEntity.class)
@Entity
@Data
@EqualsAndHashCode(callSuper = true)
//动态插入，这个注解放在基类无效，必须放到每个子类上
@DynamicInsert
//动态更新，这个注解放在基类无效，必须放到每个子类上
@DynamicUpdate
@Where(clause = " delFlag = 0")
@Table(name = "${t.tableName}")
public class ${t.entityName}Entity extends BaseCompanyIdEntity {

}
